;
layui.define(["table", "form"], function (exports) {
    tab = layui.table, tab.render({
        id: "LAY-web-list",
        elem: "#LAY-web-list",
        url: layui.setter.base + "admin/pay/listJson",
        cols: [[
            {
                field: "merchName",
                width: 200,
                title: "用户名称",
                sort: !0
            }, {
                field: "merchCode",
                title: "用户编号",
                width: 120
            }, {
                field: "bizTypeShow",
                title: "交易类型",
                templet: "#buttonTpl",
                minWidth: 100,
                align: "center"
            }, {
                field: "orderNo",
                title: "钱包订单号",
                width: 120
            }, {
                field: "amountShow",
                title: "交易金额(元)",
                templet: "<div><span style='color:#1E9FFF;font-weight: bold;'>{{d.amountFormat}}</span></div>",
                align: "right",
                minWidth: 120
            }, {
                field: "merchFeeFormat",
                title: "手续费(元)",
                templet: "<div><span style='color:#1E9FFF;font-weight: bold;'>{{d.merchFeeFormat}}</span></div>",
                align: "right",
                minWidth: 120
            }, {
                field: "orderStatusShow",
                title: "交易状态",
                templet: function (d) {
                    if (d.orderStatus == "TS") return '<span class="layui-badge layui-bg-green">' + d.orderStatusShow + '</span>';
                    if (d.orderStatus == "TI") return '<span class="layui-badge layui-bg-blue">' + d.orderStatusShow + '</span>';
                    if (d.orderStatus == "TF") return '<span class="layui-badge">' + d.orderStatusShow + '</span>';
                    if (d.orderStatus == "CX") return '<span class="layui-badge layui-bg-orange">' + d.orderStatusShow + '</span>';
                    return '<span class="layui-badge layui-bg-cyan">' + d.orderStatusShow + '</span>';
                },
                minWidth: 100,
                align: "center"
            }, {
                field: "createTime",
                title: "创建时间",
                minWidth: 166
            }, {
                field: "payTime",
                title: "完成时间",
                minWidth: 166
            }, {
                title: "操作",
                minWidth: 100,
                align: "center",
                fixed: "right",
                toolbar: "#table-content-list"
            }]],
        page: !0,
        limit: 10,
        limits: [10, 15, 20, 25, 30],
        text: {none: '暂无相关数据'}
    }), tab.on("tool(LAY-web-list)", function (row) {
        if ("firstReview" === row.event) {
        	parent.layer.open({
                type: 2,
                title: "提现审核",
                content: layui.setter.base + "admin/pay/firstReviewPage?id=" + row.data.id,
                maxmin: !0,
                area: ['80%', '90%'],
                btn: ["确定", "取消"],
                yes: function (index, layero) {
                    // 点击确认触发 iframe 内容中的按钮提交
                    layero.find('iframe').contents().find("#layuiadmin-app-form-edit").click();
                }
            });
            return;
        }

        if ("secondReview" === row.event) {
        	parent.layer.open({
                type: 2,
                title: "提现审核",
                content: layui.setter.base + "admin/pay/secondReviewPage?id=" + row.data.id,
                maxmin: !0,
                area: ['80%', '90%'],
                btn: ["确定", "取消"],
                yes: function (index, layero) {
                    // 点击确认触发 iframe 内容中的按钮提交
                    layero.find('iframe').contents().find("#layuiadmin-app-form-edit").click();
                }
            });
            return;
        }

        if ("thirdReview" === row.event) {
        	parent.layer.open({
                type: 2,
                title: "提现审核",
                content: layui.setter.base + "admin/pay/thirdReviewPage?id=" + row.data.id,
                maxmin: !0,
                area: ['80%', '90%'],
                btn: ["确定", "取消"],
                yes: function (index, layero) {
                    // 点击确认触发 iframe 内容中的按钮提交
                    layero.find('iframe').contents().find("#layuiadmin-app-form-edit").click();
                }
            });
            return;
        }


        if ("transferOutReviewPage" === row.event) {
            parent.layer.open({
                type: 2,
                title: "打款操作",
                content: layui.setter.base + "admin/pay/transferOutReviewPage?id=" + row.data.id,
                maxmin: !0,
                area: ['80%', '90%'],
                btn: ["确定", "取消"],
                yes: function (index, layero) {
                    // 点击确认触发 iframe 内容中的按钮提交
                    layero.find('iframe').contents().find("#layuiadmin-app-form-edit").click();
                }
            });
            return;
        }



        if ("certificate" === row.event) {
        	parent.layer.open({
                title: "查看凭证",
                area: ['80%', '90%'],
                content: "<p style='text-align:center'><img src='/admin/order/certificate?id=" + row.data.id + "'></p>",
                btn: ['下载'],
                yes: function () {
                    window.open('/admin/order/certificate?id=' + row.data.id, "_blank");
                }
            });
        }
    }), exports("payOrder", {})
});
